package com.itheima.map;

import java.util.HashMap;
import java.util.Map;

public class p01 {
    public static void main(String[] args) {
        Map<Integer,String >m = new HashMap<>();
        m.put(1,"tangseng");
        m.put(2,"sunwukong");
        m.put(3,"zhubujie");
       String key1= m.put(4,"shaseng");
        System.out.println(key1);
        System.out.println(m);
        String key=m.put(1,"yaoguai chtches ts");
        System.out.println(key);
        System.out.println(m.containsKey(3));//t
        System.out.println(m.containsKey(7));//f
        System.out.println(m.containsValue("honghaier"));//f
        System.out.println(m.containsValue("shaseng"));//t
        m.clear();
        System.out.println(m.isEmpty());

    }
}
